<!--续费 合同模版 -->
<script id="sign-contract-template" type="text/x-handlebars-template">
	<form class="form-horizontal form-editor form-editor-contract">
		<input type="hidden" name="id" value="{{id}}" />
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="code">合同编号</label>
					<div class="col-sm-8">
						<input name="code" id="code" type="text" class="form-control" value="{{code}}">
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label required" for="createDate">签约时间</label>
					<div class="col-sm-8">
						<div class="input-group date date-selector">
							<input name="createDate" id="createDate" type="text" class="form-control" required="required">
							<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="username">课程顾问</label>
					<div class="col-sm-8">
						<input name="userid" type="hidden" value="{{_user 'userid'}}">
						<input name="username" type="text" value="{{_user 'username'}}" class="form-control" readonly="readonly">
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="student">宝宝姓名</label>
					<div class="col-sm-8">
						<select name="student" id="student" class="chosen-select" data-entity="com.app.miwawa.api.esm.entity.customer.Student">
							{{_student studentid}}
						</select>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="parent">家长姓名</label>
					<div class="col-sm-8">
						<input type="hidden" name="parents" id="parents" value="{{parentid}}"/>
						<input id="parent" type="text" value="{{parent}}" class="form-control readonly">
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="mobile">联系方式</label>
					<div class="col-sm-8">
						<input name="mobile" type="text" value="{{mobile}}" class="form-control readonly">
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="item">购买项目</label>
					<div class="col-sm-8">
						<input name="item" type="text" value="{{item}}" class="form-control" readonly="readonly">
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label required">有效期</label>
					<div class="col-sm-10">
						<div class="input-group">
							<input name="fromDate" id="fromDate" type="text" value="{{overDate}}" class="form-control date-selector" required="required"> 
							<span class="input-group-addon no-border-radius">－</span>
							<input name="overDate" id="overDate" type="text"  class="form-control date-selector" required="required"> 
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="invoice">开具发票</label>
					<div class="col-sm-8">
						<div class="input-group">
							<label class="radio-inline c-radio"> 
								<input type="radio" name="invoice" value="是" {{checked invoice '是'}}/> 
								<span class="fa fa-check"></span> 是&emsp;
							</label> 
							<label class="radio-inline c-radio"> 
								<input type="radio" name="invoice" value="否" {{checked invoice '否'}}/> 
								<span class="fa fa-check"></span> 否
							</label>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="title">发票抬头</label>
					<div class="col-sm-10">
						<input name="title" type="text" value="{{title}}" class="form-control">
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="remark">合同备注</label>
					<div class="col-sm-10">
						<input name="remark" type="text" value="{{remark}}" class="form-control">
					</div>
				</div>
			</div>
		</div>
		<div class="widget-footer editor-footer-sm">
			<button type="button" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="取消" onclick="handlerCancel(this);" data-refresh-table="#table-contract">
				<i class="glyphicon glyphicon-remove"></i>
			</button>
			<button type="button" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="保存" onclick="validate(this, '#editor-form-contract', '.form-editor-contract');" data-submit-callback="handlerContract">
				<i class="glyphicon glyphicon-ok"></i>
			</button>
		</div>
	</form>
</script>

<!-- 查看与编辑 合同模版 -->
<script id="edit-contract-template" type="text/x-handlebars-template">
	<form class="form-horizontal form-editor form-editor-contract">
		<input type="hidden" name="id" value="{{id}}" />
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="code">合同编号</label>
					<div class="col-sm-8">
						<input name="code" id="code" type="text" class="form-control" value="{{code}}">
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label required" for="createDate">签约时间</label>
					<div class="col-sm-8">
						<div class="input-group date date-selector">
							<input name="createDate" id="createDate" type="text" value="{{createDate}}" class="form-control" required="required">
							<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="username">课程顾问</label>
					<div class="col-sm-8">
						<input name="userid" type="hidden" value="{{userid}}">
						<input name="username" type="text" value="{{username}}" class="form-control" readonly="readonly">
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="student">宝宝姓名</label>
					<div class="col-sm-8">
						<select name="student" id="student" class="chosen-select" data-entity="com.app.miwawa.api.esm.entity.customer.Student">
							{{_student studentid}}
						</select>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="parent">家长姓名</label>
					<div class="col-sm-8">
						<input type="hidden" name="parents" id="parents" value="{{parentid}}"/>
						<input id="parent" type="text" value="{{parent}}" class="form-control"  readonly="readonly">					
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="mobile">联系方式</label>
					<div class="col-sm-8">
						<input name="mobile" type="text" value="{{mobile}}" class="form-control" readonly="readonly">
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="item">购买项目</label>
					<div class="col-sm-8">
						<input name="item" type="text" value="{{item}}" class="form-control" readonly="readonly">
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label required">有效期</label>
					<div class="col-sm-10">
						<div class="input-group">
							<input name="fromDate" id="fromDate" type="text" value="{{fromDate}}" class="form-control date-selector" required="required"> 
							<span class="input-group-addon no-border-radius">－</span>
							<input name="overDate" id="overDate" type="text" value="{{overDate}}" class="form-control date-selector" required="required"> 
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="invoice">开具发票</label>
					<div class="col-sm-8">
						<div class="input-group">
							<label class="radio-inline c-radio"> 
								<input type="radio" name="invoice" value="是" {{checked invoice '是'}}/> 
								<span class="fa fa-check"></span> 是&emsp;
							</label> 
							<label class="radio-inline c-radio"> 
								<input type="radio" name="invoice" value="否" {{checked invoice '否'}}/> 
								<span class="fa fa-check"></span> 否
							</label>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="title">发票抬头</label>
					<div class="col-sm-10">
						<input name="title" type="text" value="{{title}}" class="form-control">
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="remark">合同备注</label>
					<div class="col-sm-10">
						<input name="remark" type="text" value="{{remark}}" class="form-control">
					</div>
				</div>
			</div>
		</div>
		<div class="widget-footer editor-footer-sm">
			<button type="button" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="取消" onclick="handlerCancel(this);" data-refresh-table="#table-contract">
				<i class="glyphicon glyphicon-remove"></i>
			</button>
			<button type="button" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="保存" onclick="validate(this, '#editor-form-contract', '.form-editor-contract');" data-submit-callback="handlerContract">
				<i class="glyphicon glyphicon-ok"></i>
			</button>
		</div>
	</form>
</script>

<!-- 查看与编辑 购买模版 -->
<script id="edit-buyinfo-template" type="text/x-handlebars-template">
	{{#each this}}
		<form class="form-horizontal form-editor form-editor-buyinfo">
			<input type="hidden" name="id" value="{{id}}" />
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="type">{{format type 'title'}}类型</label>
						<div class="col-sm-8">
							<select name="type" id="type" class="chosen-select" data-url="/miwawa/default/common/select.json" data-pcode="c_con_ee_type" data-entity="com.app.miwawa.api.system.entity.config.Codec">
								{{_type type}}
							</select>
						</div>
					</div>
				</div>
				<div class="col-sm-8">
					<div class="form-group">
						<label class="col-sm-2 control-label required">起止时间</label>
						<div class="col-sm-10">
							<div class="input-group">
								<input name="fromDate" id="fromDate" type="text" value="{{fromDate}}" class="form-control date-selector" required="required"> 
								<span class="input-group-addon no-border-radius">－</span>
								<input name="overDate" id="overDate" type="text" value="{{overDate}}" class="form-control date-selector" required="required"> 
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="buying">购买{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="buying" value="{{buying}}" class="form-control"/>
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="giving">赠送{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="giving" value="{{giving}}" class="form-control"/>
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label required" for="totals">总{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span class="input-group-btn" data-toggle="tooltip" data-placement="top" title="计算">
									<button type="button" class="btn btn-addon" onclick="handlerCalculator(this, '.form-editor-buyinfo')" 
													data-depend='{"addition":["buying","giving"]}' data-target="totals"><i class="fa fa-calculator"></i></button>
								</span>
								<input type="text" name="totals" id="totals" class="form-control" required="required" value="{{totals}}"/>
								<span class="input-group-addon">{{format type 'label'}}</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="priceUnit">单价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="priceUnit" value="{{priceUnit}}" class="form-control"/>
								<span class="input-group-addon">{{format type 'price'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label required" for="priceTotal">总价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span class="input-group-btn" data-toggle="tooltip" data-placement="top" title="计算">
									<button type="button" class="btn btn-addon" onclick="handlerCalculator(this, '.form-editor-buyinfo')" 
													data-depend='{"multiply":["priceUnit","buying"]}'
													data-target="priceTotal"><i class="fa fa-calculator"></i></button>
								</span>
								<input type="text" name="priceTotal" id="priceTotal" class="form-control" required="required" value="{{priceTotal}}"/>
								<span class="input-group-addon">元</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label required" for="useing">已用{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="useing" id="useing" class="form-control" value="{{useing}}" required="required"/>
								<span class="input-group-addon">课时</span>
							</div> 
						</div>
					</div>
				</div>
			</div>
			<div class="widget-footer editor-footer-sm">
				<button type="button" class="btn btn-danger btn-sm" onclick="handlerCancel(this, 'editor-wrapper-open');" data-toggle="tooltip" data-placement="top" title="取消" data-refresh-table="#table-contract">
					<i class="glyphicon glyphicon-remove"></i>
				</button>
				<button type="button" class="btn btn-primary btn-sm" onclick="determine(this, '#editor-form-buyinfo', '.form-editor-buyinfo');" data-toggle="tooltip" data-placement="top" title="保存">
					<i class="glyphicon glyphicon-ok"></i>
				</button>
			</div>
		</form>
	{{/each}}
</script>

<!-- 续费 购买模版 -->
<script id="sign-buyinfo-template" type="text/x-handlebars-template">
	{{#each this}}
		<form class="form-horizontal form-editor form-editor-buyinfo">
			<input type="hidden" name="id" value="{{id}}" />
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="type">{{format type 'title'}}类型</label>
						<div class="col-sm-8">
							<select name="type" id="type" class="chosen-select" data-url="/miwawa/default/common/select.json" data-pcode="c_con_ee_type" data-entity="com.app.miwawa.api.system.entity.config.Codec">
								{{_type type}}
							</select>
						</div>
					</div>
				</div>
				<div class="col-sm-8">
					<div class="form-group">
						<label class="col-sm-2 control-label required">起止时间</label>
						<div class="col-sm-10">
							<div class="input-group">
								<input name="fromDate" id="fromDate" type="text" value="{{fromDate}}" class="form-control date-selector" required="required"> 
								<span class="input-group-addon no-border-radius">－</span>
								<input name="overDate" id="overDate" type="text" value="{{overDate}}" class="form-control date-selector" required="required"> 
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="buying">购买{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="buying" value="{{buying}}" class="form-control"/>
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="giving">赠送{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="giving" value="{{giving}}" class="form-control"/>
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label required" for="totals">总{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span class="input-group-btn" data-toggle="tooltip" data-placement="top" title="计算">
									<button type="button" class="btn btn-addon" onclick="handlerCalculator(this, '.form-editor-buyinfo')" 
													data-depend='{"addition":["buying","giving"]}' data-target="totals"><i class="fa fa-calculator"></i></button>
								</span>
								<input type="text" name="totals" id="totals" class="form-control" required="required" value="{{totals}}"/>
								<span class="input-group-addon">{{format type 'label'}}</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="priceUnit">单价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="priceUnit" value="{{priceUnit}}" class="form-control"/>
								<span class="input-group-addon">{{format type 'price'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label required" for="priceTotal">总价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span class="input-group-btn" data-toggle="tooltip" data-placement="top" title="计算">
									<button type="button" class="btn btn-addon" onclick="handlerCalculator(this, '.form-editor-buyinfo')" 
													data-depend='{"multiply":["priceUnit","buying"]}'
													data-target="priceTotal"><i class="fa fa-calculator"></i></button>
								</span>
								<input type="text" name="priceTotal" id="priceTotal" class="form-control" required="required" value="{{priceTotal}}"/>
								<span class="input-group-addon">元</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label required" for="useing">已用{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="useing" id="useing" class="form-control" value="0" required="required"/>
								<span class="input-group-addon">课时</span>
							</div> 
						</div>
					</div>
				</div>
			</div>
			<div class="widget-footer editor-footer-sm">
				<button type="button" class="btn btn-danger btn-sm" onclick="handlerCancel(this, 'editor-wrapper-open');" data-toggle="tooltip" data-placement="top" title="取消" data-refresh-table="#table-contract">
					<i class="glyphicon glyphicon-remove"></i>
				</button>
				<button type="button" class="btn btn-primary btn-sm" onclick="determine(this, '#editor-form-buyinfo', '.form-editor-buyinfo');" data-toggle="tooltip" data-placement="top" title="保存">
					<i class="glyphicon glyphicon-ok"></i>
				</button>
			</div>
		</form>
	{{/each}}
</script>

<!-- 查看与编辑 付款模版 -->
<script id="edit-payinfo-template" type="text/x-handlebars-template">
	{{#each this}}
		<form class="form-horizontal form-editor form-editor-payinfo">
			<input type="hidden" name="id" value="{{id}}" />
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label required" for="priceOrig">原价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span class="input-group-btn" data-toggle="tooltip" data-placement="top" title="计算">
									<button type="button" class="btn btn-addon" onclick="handlerCalculator(this, '.form-editor-payinfo')" 
													data-depend='{"summation":"priceTotal"}'
													data-target="priceOrig"><i class="fa fa-calculator"></i></button>
								</span>
								<input type="text" id="priceOrig" name="priceOrig" value="{{priceOrig}}" class="form-control" required="required"/> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="discount">折扣</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="discount" value="{{discount}}" class="form-control" /> 
								<span class="input-group-addon">折</span>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-3 control-label required" for="priceReal">实价</label>
						<div class="col-sm-9">
							<div class="input-group">
								<span class="input-group-btn" data-toggle="tooltip" data-placement="top" title="计算">
									<button type="button" class="btn btn-addon" onclick="handlerCalculator(this, '.form-editor-payinfo')" 
													data-depend='{"percent":{"num":"discount","den":"priceOrig"}}'
													data-target="priceReal"><i class="fa fa-calculator"></i></button>
								</span>
								<input type="text" id="priceReal" name="priceReal" value="{{priceReal}}" class="form-control" required="required"/> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label " for="payment">支付方式</label>
						<div class="col-sm-8">
							<select name="payment" id="payment" class="chosen-select" data-url="/miwawa/default/common/select.json" data-pcode="c_payment_type" data-entity="com.app.miwawa.api.system.entity.config.Codec">
								{{_payment payment}}
							</select>
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="deposit">订金</label>
						<div class="col-sm-8">
							<div class="input-group">
								<input type="text" name="deposit" value="{{deposit}}" class="form-control" /> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-3 control-label required" for="received">实收</label>
						<div class="col-sm-9">
							<div class="input-group">
								<span class="input-group-btn" data-toggle="tooltip" data-placement="top" title="计算">
									<button type="button" class="btn btn-addon" onclick="handlerCalculator(this, '.form-editor-payinfo')" 
													data-depend='{"minus":["priceReal","deposit"]}'
													data-target="received"><i class="fa fa-calculator"></i></button>
								</span>
								<input type="text" id="received" name="received" value="{{received}}" class="form-control" required="required"/> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			
			<div class="widget-footer editor-footer-sm">
				<button type="button" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="取消" onclick="handlerCancel(this, 'editor-wrapper-open');" data-refresh-table="#table-customer">
					<i class="glyphicon glyphicon-remove"></i>
				</button>
				<button type="button" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="保存"
				 				onclick="checkPayinfo(this, '#editor-form-payinfo', '.form-editor-payinfo');">
					<i class="glyphicon glyphicon-ok"></i>
				</button>
			</div>
		</form>
	{{/each}}
</script>

<!-- 查看合同模版 -->
<script id="view-contract-template" type="text/x-handlebars-template">
	<form class="form-horizontal form-editor form-editor-contract">
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="code">合同编号</label>
					<div class="col-sm-8">
						<span id="code" class="form-control readonly">{{code}}</span>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="createDate">签约时间</label>
					<div class="col-sm-8">
						<span id="createDate" class="form-control readonly">{{createDate}}</span>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="username">课程顾问</label>
					<div class="col-sm-8">
						<span id="username" class="form-control readonly">{{username}}</span>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="student">宝宝姓名</label>
					<div class="col-sm-8">
						<span id="student" class="form-control readonly">{{student}}</span>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="parent">家长姓名</label>
					<div class="col-sm-8">
						<span id="parent" class="form-control readonly">{{parent}}</span>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="mobile">联系方式</label>
					<div class="col-sm-8">
						<span id="mobile" class="form-control readonly">{{mobile}}</span>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="item">购买项目</label>
					<div class="col-sm-8">
						<span id="item" class="form-control readonly">{{item}}</span>
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label ">有效期</label>
					<div class="col-sm-10">
						<div class="input-group">
							<span id="fromDate" class="form-control readonly">{{fromDate}}</span> 
							<span class="input-group-addon no-border-radius">－</span>
							<span id="overDate" class="form-control readonly">{{overDate}}</span> 
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="invoice">开具发票</label>
					<div class="col-sm-8">
						<span id="invoice" class="form-control readonly">{{invoice}}</span> 
					</div>
				</div>
			</div>
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="title">发票抬头</label>
					<div class="col-sm-10">
						<span id="title" class="form-control readonly">{{title}}</span> 
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label" for="remark">合同备注</label>
					<div class="col-sm-10">
						<span id="title" class="form-control readonly">{{remark}}</span> 
					</div>
				</div>
			</div>
		</div>
	</form>
</script>



<!-- 查看购买模版 -->
<script id="view-buyinfo-template" type="text/x-handlebars-template">
	{{#each this}}
		<form class="form-horizontal form-editor form-editor-buyinfo">
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="type">{{format type 'title'}}类型</label>
						<div class="col-sm-8">
							<span id="type" class="form-control readonly">{{type}}</span> 
						</div>
					</div>
				</div>
				<div class="col-sm-8">
					<div class="form-group">
						<label class="col-sm-2 control-label">起止时间</label>
						<div class="col-sm-10">
							<div class="input-group">
								<span id="fromDate" class="form-control readonly">{{fromDate}}</span> 
								<span class="input-group-addon no-border-radius">－</span>
								<span id="overDate" class="form-control readonly">{{overDate}}</span> 
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="buying">购买{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="buying" class="form-control readonly">{{buying}}</span> 
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="giving">赠送{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="giving" class="form-control readonly">{{giving}}</span> 
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="totals">总{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="totals" class="form-control readonly">{{totals}}</span> 
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="priceUnit">单价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="priceUnit" class="form-control readonly">{{priceUnit}}</span> 
								<span class="input-group-addon">{{format type 'price'}}</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="priceTotal">总价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="priceTotal" class="form-control readonly">{{priceTotal}}</span> 
								<span class="input-group-addon">元</span>
							</div> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label " for="useing">已用{{format type 'label'}}</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="useing" class="form-control readonly">{{useing}}</span> 
								<span class="input-group-addon">{{format type 'units'}}</span>
							</div> 
						</div>
					</div>
				</div>
			</div>
		</form>
	{{/each}}
</script>

<!-- 查看付款模版 -->
<script id="view-payinfo-template" type="text/x-handlebars-template">
	{{#each this}}
		<form class="form-horizontal form-editor form-editor-payinfo">
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="priceOrig">原价</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="priceOrig" class="form-control readonly">{{priceOrig}}</span> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="discount">折扣</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="discount" class="form-control readonly">{{discount}}</span> 
								<span class="input-group-addon">折</span>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-3 control-label" for="priceReal">实价</label>
						<div class="col-sm-9">
							<div class="input-group">
								<span id="priceReal" class="form-control readonly">{{priceReal}}</span> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="payment">支付方式</label>
						<div class="col-sm-8">
							<span id="payment" class="form-control readonly">{{payment}}</span> 
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="deposit">订金</label>
						<div class="col-sm-8">
							<div class="input-group">
								<span id="deposit" class="form-control readonly">{{deposit}}</span> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-3 control-label" for="received">实收</label>
						<div class="col-sm-9">
							<div class="input-group">
								<span id="received" class="form-control readonly">{{received}}</span> 
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	{{/each}}
</script>

<!-- 查看停课信息模版 -->
<script id="view-pause-template" type="text/x-handlebars-template">
	{{#each this}}
		<form class="form-horizontal form-editor form-editor-stopinfo">
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="createDate">处理时间</label>
						<div class="col-sm-8">
							<span id="createDate" class="form-control readonly">{{createDate}}</span>
						</div>
					</div>
				</div>
				<div class="col-sm-8">
					<div class="form-group">
						<label class="col-sm-2 control-label" for="fromDate">停课时间</label>
						<div class="col-sm-10">
							<div class="input-group">
								<span id="fromDate" class="form-control readonly">{{fromDate}}</span> 
								<span class="input-group-addon no-border-radius">－</span>
								<span id="overDate" class="form-control readonly">{{overDate}}</span> 
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-4">
					<div class="form-group">
						<label class="col-sm-4 control-label" for="username">处理人</label>
						<div class="col-sm-8">
							<span id="username" class="form-control readonly">{{username}}</span>
						</div>
					</div>
				</div>
				<div class="col-sm-8">
					<div class="form-group">
						<label class="col-sm-2 control-label" for="reason">停课原因</label>
						<div class="col-sm-8">
							<span id="reason" class="form-control readonly">{{reason}}</span>
						</div>
					</div>
				</div>
			</div>
		</form>
	{{/each}}
</script>
